home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3688 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  1.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6c 6f | 63 75 74 75 73 2e 72 63 |Path: lo|cutus.rc|
|00000010| 68 6c 61 6e 64 2e 69 62 | 6d 2e 63 6f 6d 21 75 73 |hland.ib|m.com!us|
|00000020| 65 6e 65 74 0a 46 72 6f | 6d 3a 20 50 68 69 6c 69 |enet.Fro|m: Phili|
|00000030| 70 20 53 74 61 69 74 65 | 20 3c 70 73 74 61 69 74 |p Staite| <pstait|
|00000040| 65 40 76 6e 65 74 2e 69 | 62 6d 2e 63 6f 6d 3e 0a |e@vnet.i|bm.com>.|
|00000050| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000060| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 53 75 62 6a 65 63 |.lang.c+|+.Subjec|
|00000070| 74 3a 20 52 65 3a 20 54 | 79 70 65 20 43 6f 6e 76 |t: Re: T|ype Conv|
|00000080| 65 72 74 65 72 20 50 72 | 6f 62 6c 65 6d 0a 44 61 |erter Pr|oblem.Da|
|00000090| 74 65 3a 20 54 68 75 2c | 20 32 35 20 4a 61 6e 20 |te: Thu,| 25 Jan |
|000000a0| 31 39 39 36 20 31 30 3a | 31 35 3a 35 38 20 2d 30 |1996 10:|15:58 -0|
|000000b0| 36 30 30 0a 4f 72 67 61 | 6e 69 7a 61 74 69 6f 6e |600.Orga|nization|
|000000c0| 3a 20 49 42 4d 20 52 6f | 63 68 65 73 74 65 72 2c |: IBM Ro|chester,|
|000000d0| 20 4f 53 2f 32 20 44 65 | 76 69 63 65 20 44 72 69 | OS/2 De|vice Dri|
|000000e0| 76 65 72 20 54 65 61 6d | 0a 4d 65 73 73 61 67 65 |ver Team|.Message|
|000000f0| 2d 49 44 3a 20 3c 33 31 | 30 37 41 43 42 45 2e 34 |-ID: <31|07ACBE.4|
|00000100| 34 36 42 40 76 6e 65 74 | 2e 69 62 6d 2e 63 6f 6d |46B@vnet|.ibm.com|
|00000110| 3e 0a 52 65 66 65 72 65 | 6e 63 65 73 3a 20 3c 42 |>.Refere|nces: <B|
|00000120| 48 4f 57 45 53 2e 39 36 | 4a 61 6e 32 32 31 36 33 |HOWES.96|Jan22163|
|00000130| 34 32 30 40 63 73 73 75 | 6e 33 2e 63 6f 72 70 2e |420@cssu|n3.corp.|
|00000140| 6d 6f 74 2e 63 6f 6d 3e | 0a 4e 4e 54 50 2d 50 6f |mot.com>|.NNTP-Po|
|00000150| 73 74 69 6e 67 2d 48 6f | 73 74 3a 20 70 6f 77 65 |sting-Ho|st: powe|
|00000160| 72 74 6f 6f 6c 2e 72 63 | 68 6c 61 6e 64 2e 69 62 |rtool.rc|hland.ib|
|00000170| 6d 2e 63 6f 6d 0a 4d 69 | 6d 65 2d 56 65 72 73 69 |m.com.Mi|me-Versi|
|00000180| 6f 6e 3a 20 31 2e 30 0a | 43 6f 6e 74 65 6e 74 2d |on: 1.0.|Content-|
|00000190| 54 79 70 65 3a 20 74 65 | 78 74 2f 70 6c 61 69 6e |Type: te|xt/plain|
|000001a0| 3b 20 63 68 61 72 73 65 | 74 3d 75 73 2d 61 73 63 |; charse|t=us-asc|
|000001b0| 69 69 0a 43 6f 6e 74 65 | 6e 74 2d 54 72 61 6e 73 |ii.Conte|nt-Trans|
|000001c0| 66 65 72 2d 45 6e 63 6f | 64 69 6e 67 3a 20 37 62 |fer-Enco|ding: 7b|
|000001d0| 69 74 0a 58 2d 4d 61 69 | 6c 65 72 3a 20 4d 6f 7a |it.X-Mai|ler: Moz|
|000001e0| 69 6c 6c 61 20 32 2e 30 | 62 34 20 28 58 31 31 3b |illa 2.0|b4 (X11;|
|000001f0| 20 49 3b 20 41 49 58 20 | 31 29 0a 54 6f 3a 20 62 | I; AIX |1).To: b|
|00000200| 68 6f 77 65 73 40 63 73 | 73 75 6e 33 2e 63 6f 72 |howes@cs|sun3.cor|
|00000210| 70 2e 6d 6f 74 2e 63 6f | 6d 0a 0a 42 72 61 64 20 |p.mot.co|m..Brad |
|00000220| 48 6f 77 65 73 20 77 72 | 6f 74 65 3a 0a 3e 20 0a |Howes wr|ote:.> .|
|00000230| 3e 20 41 66 74 65 72 20 | 72 75 6e 6e 69 6e 67 20 |> After |running |
|00000240| 74 68 65 20 63 6f 64 65 | 20 62 65 6c 6f 77 2c 20 |the code| below, |
|00000250| 49 20 67 65 74 20 41 3a | 3a 61 63 74 69 76 65 20 |I get A:|:active |
|00000260| 3d 3d 20 2d 31 2c 20 61 | 6e 64 20 42 3a 3a 61 63 |== -1, a|nd B::ac|
|00000270| 74 69 76 65 20 3d 3d 20 | 30 2e 20 41 6e 79 6f 6e |tive == |0. Anyon|
|00000280| 65 0a 3e 20 77 69 74 68 | 20 61 6e 20 65 78 70 6c |e.> with| an expl|
|00000290| 61 69 6e 61 74 69 6f 6e | 20 77 68 79 3f 20 4f 72 |aination| why? Or|
|000002a0| 20 69 73 20 6d 79 20 63 | 6f 6d 70 69 6c 65 72 20 | is my c|ompiler |
|000002b0| 62 75 67 67 65 64 2e 2e | 2e 0a 3e 20 0a 3e 20 20 |bugged..|..> .> |
|000002c0| 20 63 6c 61 73 73 20 41 | 20 7b 0a 3e 20 20 20 20 | class A| {.> |
|000002d0| 20 6c 6f 6e 67 20 61 3b | 0a 3e 20 0a 3e 20 20 20 | long a;|.> .> |
|000002e0| 70 75 62 6c 69 63 3a 0a | 3e 20 20 20 20 20 73 74 |public:.|> st|
|000002f0| 61 74 69 63 20 6c 6f 6e | 67 20 61 63 74 69 76 65 |atic lon|g active|
|00000300| 3b 20 2f 2f 20 6b 65 65 | 70 20 74 72 61 63 6b 20 |; // kee|p track |
|00000310| 6f 66 20 61 6c 6c 20 41 | 20 6f 62 6a 65 63 74 73 |of all A| objects|
|00000320| 20 69 6e 20 65 78 69 73 | 74 65 6e 63 65 0a 3e 20 | in exis|tence.> |
|00000330| 20 20 20 20 41 28 20 69 | 6e 74 20 78 20 3d 20 30 | A( i|nt x = 0|
|00000340| 20 29 20 3a 20 61 28 20 | 78 20 29 20 7b 20 2b 2b | ) : a( |x ) { ++|
|00000350| 61 63 74 69 76 65 3b 20 | 7d 3b 0a 3e 20 20 20 20 |active; |};.> |
|00000360| 20 7e 41 28 29 20 7b 20 | 2d 2d 61 63 74 69 76 65 | ~A() { |--active|
|00000370| 3b 20 7d 3b 0a 3e 20 20 | 20 7d 0a 0a 59 6f 75 72 |; };.> | }..Your|
|00000380| 20 70 72 6f 62 6c 65 6d | 20 69 73 20 74 68 65 20 | problem| is the |
|00000390| 64 65 66 61 75 6c 74 20 | 28 63 6f 6d 70 69 6c 65 |default |(compile|
|000003a0| 72 20 67 65 6e 65 72 61 | 74 65 64 29 20 63 6f 70 |r genera|ted) cop|
|000003b0| 79 20 63 6f 6e 73 74 72 | 75 63 74 6f 72 20 66 6f |y constr|uctor fo|
|000003c0| 72 20 41 0a 69 73 20 62 | 65 69 6e 67 20 75 73 65 |r A.is b|eing use|
|000003d0| 64 2e 20 20 54 72 79 20 | 61 64 64 69 6e 67 20 74 |d. Try |adding t|
|000003e0| 68 69 73 20 6d 65 6d 62 | 65 72 20 74 6f 20 41 3a |his memb|er to A:|
|000003f0| 0a 0a 20 20 20 20 41 28 | 20 63 6f 6e 73 74 20 41 |.. A(| const A|
|00000400| 26 20 78 20 29 20 3a 20 | 61 28 20 78 2e 61 20 29 |& x ) : |a( x.a )|
|00000410| 20 7b 20 2b 2b 61 63 74 | 69 76 65 3b 20 7d 0a 0a | { ++act|ive; }..|
|00000420| 4f 74 68 65 72 77 69 73 | 65 2c 20 79 6f 75 72 20 |Otherwis|e, your |
|00000430| 72 65 66 65 72 65 6e 63 | 65 20 63 6f 75 6e 74 65 |referenc|e counte|
|00000440| 72 20 66 6f 72 20 41 27 | 73 20 64 6f 65 73 6e 27 |r for A'|s doesn'|
|00000450| 74 20 67 65 74 20 22 63 | 72 65 64 69 74 22 20 66 |t get "c|redit" f|
|00000460| 6f 72 20 74 68 65 0a 63 | 72 65 61 74 69 6e 67 20 |or the.c|reating |
|00000470| 6f 66 20 74 68 65 20 63 | 6f 70 79 2d 63 74 6f 72 |of the c|opy-ctor|
|00000480| 27 64 20 41 2c 20 62 75 | 74 20 74 68 65 20 64 65 |'d A, bu|t the de|
|00000490| 73 74 72 75 63 74 6f 72 | 20 73 75 62 74 72 61 63 |structor| subtrac|
|000004a0| 74 73 20 6f 6e 65 2e 2e | 2e 0a 0a 2d 2d 20 0a 0a |ts one..|...-- ..|
|000004b0| 50 68 69 6c 20 53 74 61 | 69 74 65 2c 20 28 35 30 |Phil Sta|ite, (50|
|000004c0| 37 29 20 32 35 33 2d 32 | 35 32 39 2c 20 74 65 61 |7) 253-2|529, tea|
|000004d0| 6d 20 4f 53 2f 32 0a 69 | 6e 74 65 72 6e 65 74 3a |m OS/2.i|nternet:|
|000004e0| 20 70 73 74 61 69 74 65 | 40 76 6e 65 74 2e 69 62 | pstaite|@vnet.ib|
|000004f0| 6d 2e 63 6f 6d 20 20 69 | 6e 74 65 72 6e 61 6c 3a |m.com i|nternal:|
|00000500| 20 70 73 74 61 69 74 65 | 40 72 63 68 6c 61 6e 64 | pstaite|@rchland|
|00000510| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+